#include <stdio.h>
#define MAXS 30

char *search(char *s, char *t);
void ReadString(char s[]); /* 裁判提供，细节不表 */

int main()
{
    char s[MAXS], t[MAXS], *pos;

    ReadString(s);
    ReadString(t);
    pos = search(s, t);
    if (pos != NULL)
        printf("%d\n", pos - s);
    else
        printf("-1\n");

    return 0;
}

/* 你的代码将被嵌在这里 */
#include <string.h>
char *search(char *s, char *t)
{
    char *p;
    p = NULL; // 初始化NULL，返回空指针
    for (int i = 0; *(s + i) != '\0'; i++)
    {
        int flag = 0;
        for (int j = 0; (*(t + j) != '\0') && (*(t + j) == *(s + i + j)); j++)
        {
            flag++;
        }
        if (flag == strlen(t))
        {
            return (s + i);
            break;
        }
    }
    return p;
}
